<template>
    <div id="app">
      <el-container>
        <!-- 头部导航 -->
        <el-header>
          <div class="header-content">
            <div class="logo">在线医疗诚信管理系统</div>
            <el-menu 
              :default-active="activeIndex" 
              mode="horizontal" 
              background-color="#42b983" 
              text-color="#fff" 
              active-text-color="#ffeb3b"
              router
            >
              <el-menu-item index="/news">首页</el-menu-item>
              <el-menu-item index="/records">就医记录</el-menu-item>
              <el-menu-item index="/appointment">挂号</el-menu-item>
              <el-menu-item index="/feedback">意见反馈</el-menu-item>
              <el-menu-item index="/profile">个人中心</el-menu-item>
            </el-menu>
          </div>
        </el-header>
        
        <!-- 主要内容 -->
        <el-main>
          <router-view />
        </el-main>
        
        <!-- 页脚 -->
        <el-footer>
          <div class="footer-content">
            <div class="footer-column">
              <h3>关于我们</h3>
              <ul>
                <li><a href="#">网站简介</a></li>
                <li><a href="#">团队介绍</a></li>
                <li><a href="#">联系方式</a></li>
                <li><a href="#">加入我们</a></li>
              </ul>
            </div>
            
            <div class="footer-column">
              <h3>医疗服务</h3>
              <ul>
                <li><a href="#">预约挂号</a></li>
                <li><a href="#">在线咨询</a></li>
                <li><a href="#">报告查询</a></li>
                <li><a href="#">药品查询</a></li>
              </ul>
            </div>
            
            <div class="footer-column">
              <h3>就医指南</h3>
              <ul>
                <li><a href="#">就诊流程</a></li>
                <li><a href="#">科室介绍</a></li>
                <li><a href="#">专家介绍</a></li>
                <li><a href="#">医保政策</a></li>
              </ul>
            </div>
            
            <div class="footer-column">
              <h3>联系方式</h3>
              <ul>
                <li>电话：400-123-4567</li>
                <li>邮箱：info@hospital.com</li>
                <li>地址：北京市海淀区科技园路88号</li>
              </ul>
            </div>
          </div>
          
          <div class="copyright">
            <p>© 2023 医疗诚信管理系统 版权所有 | 京ICP备12345678号</p>
          </div>
        </el-footer>
      </el-container>
    </div>
  </template>
  
  <script>
  import { computed } from 'vue'
  import { useRoute } from 'vue-router'
  
  export default {
    name: 'App',
    setup() {
      const route = useRoute()
      const activeIndex = computed(() => route.path)
      
      return {
        activeIndex
      }
    }
  }
  </script>
  
  <style scoped>
  #app {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #333;
    line-height: 1.6;
  }
  
  .el-header {
    background-color: #42b983;
    color: white;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  
  .header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
  }
  
  .logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
  }
  
  .el-menu {
    border-bottom: none;
  }
  
  .el-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 15px;
  }
  
  .el-footer {
    background-color: #333;
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 50px;
  }
  
  .footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
    padding: 0 15px;
  }
  
  .footer-column h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
  }
  
  .footer-column ul {
    list-style: none;
    padding: 0;
  }
  
  .footer-column ul li {
    margin-bottom: 10px;
  }
  
  .footer-column ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
  }
  
  .footer-column ul li a:hover {
    color: #42b983;
  }
  
  .copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    font-size: 14px;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  @media (max-width: 768px) {
    .header-content {
      flex-direction: column;
      text-align: center;
      padding: 20px 0;
    }
    
    .footer-content {
      grid-template-columns: 1fr;
      gap: 20px;
    }
  }
  </style>